export const SEPARATOR_TEXT = '配置已更新'

export const ROLE_EMPTY_ERROR = '角色设定不能为空'

// 会话接口地址
export const CHAT_URL = '/api/v1/chat_agent/completions'

// 会话返回line状态
export enum AgentStatus {
  llm_start = 1,
  chat_model_start = 2,
  llm_new_token = 3,
  llm_end = 4,
  llm_error = 5,
  chain_start = 6,
  chain_end = 7,
  chain_error = 8,
  tool_start = 9,
  tool_end = 10,
  tool_error = 11,
  text = 12,
  retry = 13,
  retriever_start = 14,
  retriever_end = 15,
  retriever_error = 16,
  agent_action = 17,
  agent_finish = 18,
  think = 19,
  error = -1,
  // ---自定义状态---
  content_illegal = 30 // 内容违法
}

// 会话返回line中需要展示给用户的assistant信息
export const ASSISTANT_STATUS = [
  AgentStatus.llm_start,
  AgentStatus.chat_model_start,
  AgentStatus.llm_new_token,
  AgentStatus.llm_end,
  AgentStatus.llm_error,
  AgentStatus.chain_start,
  AgentStatus.chain_end,
  AgentStatus.chain_error,
  AgentStatus.tool_start,
  AgentStatus.tool_end,
  AgentStatus.tool_error,
  // AgentStatus.text,
  // AgentStatus.retry,
  AgentStatus.retriever_start,
  AgentStatus.retriever_end,
  AgentStatus.retriever_error,
  AgentStatus.agent_action,
  AgentStatus.agent_finish,
  AgentStatus.error,
  AgentStatus.think,
  // ---非法状态---
  AgentStatus.content_illegal
]

// 会话溯源类型
export const CITATION_TYPE = {
  plugin: 'plugin',
  knowledge: 'knowledge'
}
